home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
WORDMISC
/
BANNER.LZH
/
FONTSY.DOC
< prev
next >
Wrap
Text File
|
1986-09-06
|
21KB
|
578 lines
FONTSY
Multiple Font Banner Printer
MS-DOS Version 2.1 9/6/86
(C) 1985,1986 Merlin R. Null
This Archive should contain:
FONTSY .EXE Multiple font banner printer
FONTSY .BAS QuickBASIC source for the above
FSY .ASM Source for fast video routines for Fontsy
FONTSY .DOC This documentation
FONTCODE.EXE Tool for modifying fonts
FONTCODE.BAS QuickBASIC source for the above
FCD .EXE Fast video routines for Fontcode
The compiled QuickBASIC programs should run on most MS-DOS machines.
The external runtime package is not required.
Nineteen fonts are included in the archive.
CLARE.FNT Clarendon short version
A 70 column 54 character serifed font with upper case only. It will
print in 80 columns.
CLARENDN.FNT Clarendon full version
The same font with full lower case added. It requires over 100
columns due to the additional descender space required for g, p, q
and y.
FUTURA.FNT Futura Black
A 46 column 94 character very strange font sometimes used in small
amounts in advertising. It is a full font.
HERON.FNT
A 50 column high 94 character, serifed font. My first attempt at a
font. It was not derived from anything in particular.
KIWI.FNT
Similar to Heron, but boldface.
RAVEN.FNT
A 65 column 56 character sans serif font with upper case only.
GOTHIC.FNT Old English
The Gothic font is large enough that it will not fit in 80 columns.
I use 17 pitch and reduced linefeeds to make it work on the standard
size tractor feed paper. Contains 77 characters.
GOTHIC2.FNT Old English small version
A smaller version of the above.
GOTHIC2R.FNT Old English small version reverse
Reverse printing version of Gothic2.
AM.FNT American Standard
A 23 column 94 character small font
AMI.FNT American Standard Italic
As above but Italic
AMV.FNT American Standard Vertical
Vertical version of AM.FNT
AMVI.FNT American Standard Vertical Italic
Vertical version of AMI.FNT
GREEK.FNT Greek Standard
A 23 column 24 character Greek alphabet with upper case only.
GREEKI.FNT Greek Standard Italic
As above in Italic
GREEKV.FNT Greek Standard Vertical
Vertical version of GREEK.FNT
GREEKVI.FNT Greek Standard Vertical Italic
Vertical version of GREEKI.FNT
DINGBAT.FNT Designs
Not really a font, but graphic designs.
CLIP.FNT
Clip Art
Fontsy was written because I needed a better sign making program for
LOSCON, the annual Science Fiction convention of the Los Angeles
Science Fantasy Society. In 1984 the only useable banner program I
had was GOTHIC. I found the old public domain banner program much
too crude for good signs and they are too light to be read across a
large room. I also wanted to have several fonts on line. The
original version of Fontsy was written in MBASIC for the CP/M basic
compiler. The MS-DOS version has changed a lot. Color, fast
assembly language video routines and a number of new options have
been added.
The best effect can be obtained with Fontsy by using solid graphic
blocks available on most dot matrix printers or by downloading a
block in place of one character. If this is not available or you
have a letter quality printer, use the @ sign as the print character.
All fonts are set to use the @ sign in the 2.0 release of Fontsy.
This can be changed on the fly with Fontsy or changed permanently
with either Fontsy or Fontcode.
Running Fontsy
You will be prompted to enter the name of the font. The extension
.FNT is not required. If you do not recall what fonts are available,
just enter a drive name (A:) or path (c:\fsy\) to get a list of fonts
on that drive/directory. The trailing backslash is required for a
subdirectory listing.
The font can also be entered from the DOS command line. Example:
C:\FONTSY GOTHIC
At the next prompt you have two choices. You may enter your banner
text followed by a <RETURN> to print your banner. Or a <RETURN>
without any text input will take you to the menu to change default
font parameters or fonts. The print screen with HERON.FNT loaded
looks like this:
FONTSY version 2.0 9/3/86 (C) 1985, 1986 Merlin R. Null
Heron version 1.1 (C) 1985 Merlin R. Null
Available characters are:
space ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = >
? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _
` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~
<Return> for options ^C to exit
Banner text ? _
Only the characters listed above the prompt are available for the
particular font you are using. If a lower case letter is missing
from the font, Fontsy will substitute the upper case letter. If any
other character is not available, Fontsy will ignore your input for
that character only. In the example above a full character set is
available, so all printing characters may be used.
If you enter <Return>, you will see the following menu:
Font Options
1 Change Fonts is: HERON.FNT
2 Set column to start printing is: Column 7
3 Set print character is: 64 decimal
4 Set banner spacing is: 3 rows
5 Toggle character width is: Single
6 Toggle character height is: Single
7 Printer initialization string
8 Save changes to disk
<Return> Enter banner text
Option or <RETURN> ? _
Option 1 Change Fonts
Simply goes back to the initial screen to enter a new font. The
initial screen would have been bypassed, if you loaded a font
directly from DOS.
Option 2 Set column to start printing
Allows you to reset the amount of space under the banner. This
option can be used to set for more than one line of text with smaller
fonts. To do so you must turn the printer off and roll the paper
back to the start of the first line and redo any printer preset.
Option 3 Set print character
Allows you to change the print character. In the distribution fonts
this is set to the @ sign. This is because the @ sign is the densest
character of the standard set. You may change this to any other
printable character available in your printers character set by
simply entering it at the prompt.
You can enter characters with the 8th bit set by entering the decimal
value of the character you wish to use. If you want to specify a
character by its ASCII decimal number, it must be at least two
characters long. Numbers over 255 will be rejected.
Entering 255 causes the large characters in the banner to be printed
with their own small characters. <Return> retains the current value.
Option 4 Set banner spacing
Allows you to set the number of rows between the large characters in
the banner. Once this option is set the default value included with
the font is lost. If you want the font default value back and forgot
what the value was, you should reload the font with option 1. A
<Return> at "Number of rows?" retains the current value.
Option 5 Toggle character width
You may set printing to double or triple width. This repeats each
row 2 or 3 times. It produces a much more blocky font. I use double
width with the CLARE font along with presetting half normal linefeeds
(6/72 or 12/144) at 10 pitch. This produces just about the largest
possible characters on 8 inch wide paper.
Option 6 Toggle character height
Set double, triple or half height. Double or triple height can only
be used on the smaller fonts. It can be used in combination with
option 5 to produce some really hugh letters on wide paper.
Half height works well with some fonts, and not quite perfect with
others. The reason is that the number of small characters to print
is calculated with integer division. This can result in an extra
pixel here and there. If you use this a lot, consider using Fontcode
to generate a half height font.
Option 7 Printer initialization string
Actually, printer initialization and printer reset strings. Since
QuickBASIC allows strings of up to 32,767 bytes in length, you can
use almost anything you want.
Use this to preset a font for your printer. Most fonts produce
better results with reduced linefeeds (about 6/72) and 17 pitch. You
need to be familiar with your printer commands or at least have the
manual handy.
The printer strings are entered one byte at a time by entering the
decimal value for each byte.
You could even enter a download character via this string.
If you use the preset string, you should also use the printer reset
string so that when Fontsy is done the printer returns to normal.
If you use this option, I suggest you make sure the font is working
correctly and then save the changes to disk with option 8.
Option 8 Save changes to disk
Changes made to font defaults at this menu may be made permanent for
the loaded font. The modified font will overwrite the existing font,
so make sure you have a backup.
Entering a <RETURN> without any selection at the option menu returns
to the text entering screen.
If you have a dot matrix printer with a download character set, you
may want to change the @ sign to a solid block for darker banners.
On the Gemini-10X the maximum size block of this type is 5 X 7 pins.
For a slightly smoother character set in the banner, omit the corner
dots in this block. If your printer does not have the download
character set, check to see if there are graphics blocks accessed
some other way.
FONTCODE
FONTCODE will let you change existing fonts, extend them to add
missing characters or create your own from scratch.
FONTCODE creates the compressed data files that FONTSY uses for
printing banners. To generate a new font, you simply create a text
file with your word processor in non document mode that is exactly
like each large letter you want in a font. There will be some
distortion of the letter on the screen. Normally a character on
screen should be made to appear too wide. The rows on a printer are
usually more compressed. If you need a sample, use FONTCODE to
extract a character from one of the standard fonts.
Each file in a font must have the same main filename. They should
only differ in the extension. For example:
HERON.065 Contains the raw data for the large letter A
HERON.066 Contains the raw data for the large letter B
HERON.067 Contains the raw data for the large letter C
HERON.068 Contains the raw data for the large letter D
etc.
The number in the extension is the decimal ASCII value of the large
letter. You need not create all 95 possible characters for your
font. A font could contain only one character and still be encoded
by FONTCODE. You could even create a non alphabet "font" that would
have something like an apple when you hit "A" and a bat when you hit
"B" or any other block graphic image. These could be used to
decorate a banner printed with one of the regular fonts. DINGBAT.FNT
is an example of this type of "font".
Running FONTCODE
If you want to modify an existing encoded font you can specify the
font at the DOS command line by entering:
FONTCODE <fontname>
The extension is not required. You may also select an encoded font
to modify at the main menu. If you have selected a font from DOS,
your font will be indicated by the menu. Example:
FONTCODE Version 2.0 9/2/86 (C) 1985,1986 Merlin R. Null
The current font is: GOTHIC.FNT
Title: Gothic (Old English) version 1.0
Requires 132 columns
Characters included in this font are:
space ! " # $ & ' ( ) , - . 0 1 2 3 4 5 6 7 8 9 : ; ? A B C D E F
G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m
n o p q r s t u v w x y z
1. Load an existing font (encoded)
2. Load a full set of font characters (text)
3. Open a new font
4. Load a single font character (text)
5. Unload a single character from the current font
6. Unload all of the current font to text files
7. Save the current font
8. Change font defaults
9. Modify font text files (menu #2)
Option (1-9) or <Esc> to exit ? _
Option 1. Load an existing font (encoded). Will just load an
encoded font, if you forgot to name it at the CP/M command line.
Option 2. Load a full set of font characters (text). This will
create an encoded font from scratch. You will be prompted for, font
name title, print character (the default character to print each
pixel), margin (offset to center the banner) and number of rows
between each large character. FONTCODE will then look for all source
files for the font you have named. These files must have exactly the
same filename as your output font. They will differ only in the
extension. The source files have numeric extension and the output
file should have the extension .FNT. You can specify the extension
of the encoded font to be something other than FNT, but to use this
font with FONTSY, you would have to give the extension to load it.
It takes quite a while to encode a full font. FONTCODE would have to
read in 95 files. Disk access is what takes the time.
Option 3. Open a new font. This just sets up the fontname, title
and defaults so that font source files may be read in one at a time
with function 4. Do not open a new font if all you want to do is
modify an existing font. This option is just for generating encoded
fonts from scratch. Option 2 does not require a separate opening of
the font.
Option 4. Load a single font character (text). This is how you
bring in a modified character to a previously encoded font or add a
new character. After selecting this option, characters are added to
the font by entering a single keystroke followed by <RETURN>.
Option 5. Unload a single character from the current font. This
will recreate a source (text) file for single character. Use this if
you want to modify only a few characters. Try this on one of the
fonts in this library to see the structure of the source files.
Option 6. Unload all of the current font to text files. If you want
to do extensive modification of a font, or use an existing font as a
framework for generating a new one, you can recreate the source for
an entire font at one time. Be sure you have lots of disk space
available. This will generate from 100K to over 200K for a large
font. The source files for the font HERON take up 196K with a 2K
cluster size on my hard disk. With 1K clusters on floppy, this
number will be reduced a fair amount. The byte count stays the same
on both cases. Just the storage space required changes.
Option 7. Save the current font. If you forget to save a modified
font, you will be prompted to do so before you exit or load a new
font.
Option 8. Change font defaults. Use this option to change the title
or any of the font default values on previously encoded fonts.
Option 9. Modify font text files. Really a gateway to menu #2. All
of the sub options of menu #2 deal only with font source files. They
are not for use with encoded fonts. The menu:
Modify font text files
For modifying banner font source files
1. Rotate a single output file 180 degrees
2. Rotate a single output file 90 degrees clockwise
3. Invert line order of a single file
4. Rotate a full font 180 degrees
5. Rotate a full font 90 degrees clockwise
6. Invert line order of a full font
Option or <Esc> to exit ? _
Option 9.1 Rotate a single output file 180 degrees. For example,
suppose you have created the lower case letter p for your new font
FOO. This would be in a file named FOO.112. You can create a lower
case d with option 1. Specify FOO.112 as the input file and FOO.100
as the output. It is much easier to modify existing files than
create new ones from scratch.
Option 9.2 Rotate a single output file 90 degrees clockwise. Useful
when creating a horizontal font from a vertical one.
Option 9.3 Invert line order of a single file. As with the example
in option 9.1, input FOO.114 and specify the output as FOO.113 to
generate the lower case q, and input FOO.100 to get FOO.098 the lower
case b.
Options 9.4 - 9.6 are merely full font versions of the first three
options. These options require that the input filename without
extension be different from the output filename. You will also need
lots of disk space, up to 300K, depending on the font size. If you
ware working on floppys, put the source files on one disk and direct
the output to a second drive.
If you are working on a floppy system you might want to use a
subdirectory. The root directory is often limited to 112 entries.
This limit does not apply in a subdirectory. If you unload a full 95
character font the 112 limit can be quickly reached. On a hard disk
you should have no problems.
Font Structure
With Fontsy the data files are only about 6-8K for a full 95
character font. That is because there is not a full character or bit
map of the font. The data only includes two bytes for each segment
on a given row. First, what column to start printing and second, how
many pixels in succession. If it is the last segment in a given row,
the 8th bit is set high on the second byte to represent the carriage
return, line feed.
The encoded font contains a header with five records containing 1.
the title and copyright notice for the font, 2. an optional comment
or subtitle record, plus the font default values: 3. Print character,
4. margin value and 5. rows between banner characters. This is
followed by one record for each character (6-100). Within each field
blank lines are represented by the single byte FF hex. A segment of
pixels to print is defined by two bytes. The first giving the row to
print (with an offset of decimal 32), followed by the number of
pixels to print (also with an offset of 32 decimal). If this segment
is the final one in a row, the 8th bit is set on the number of pixels
byte. Example:
@@@@@@@@@@ @@@@@@
^ ^
column 16 column 35
This would be encoded as: 30h 2Ah 43h A6h. These four bytes replace
41 bytes of spaces and @ signs, the carriage return and line feed.
The final byte in the record is followed by 0Dh 0Ah as the record
delimiter.
After the font data comes 5 more records. 101. Printer
initialization string, 102. Printer reset string, 103. Horizontal
multiplier (rows), 104. Vertical multiplier (columns) and 105.
Vertical divisor (columns).
Compiling the Source Code
If you want to make changes to your copy of the source code, compile
with the switches as follows:
QB FONTSY /O/E;
Assemble the video routines with no special switches:
MASM FSY;
And link the object code:
LINK FONTSY + FSY + SMALLERR /E;
The /E switch causes the executable file to be about 3K shorter. It
is not documented in the QuickBASIC manual, but is covered in the
MASM documentation. It will shorten any stand alone program compiled
with QuickBASIC. It does not help much with programs linked to the
external runtime package, BRUN20.EXE.
References
There are many books of fonts suitable for source material for banner
fonts. I have used the following books to a greater or less degree
in generating some of the fonts:
1. ABC of Lettering and Printing Typefaces by Erik Lindgren
Greenwich House, New York 1982
2. Letter Forms, 110 Complete Alphabets by Frederick Lambert
Dover Publications, Inc., New York 1972
Originally published London 1964
3. The ABC of Lettering by J. I. Biegeleisen 5th edition
Harper & Row, Publishers, Inc., New York 1976
Look for books with both upper and lower case, punctuation and a
large variety of additional characters.
I find it easier to do the large character files if I first graph
them out on 10 square per inch fadeout paper. Two squares per small
character. The files could be done from scratch on the screen but
the perspective distortion makes this difficult for any character
with a curve or diagonal.
LEGAL NOTICE
Fontsy, Fontcode, this documentation and the fonts HERON.FNT,
KIWI.FNT, CLARE.FNT, CLARENDN.FNT and RAVEN.FNT are NOT "Public
Domain." Copyright on each is held by the author:
Merlin R. Null
P. O. Box 9422
N. Hollywood, CA 91609
(818) 762-1429
Feel free to make copies of the programs for your own use or for your
friends. However, they may NOT be sold or included with any
collection of programs for sale or used as an inducement to buy
another product or program without the written permission of the
author. Permission is also given for nonprofit computer clubs to
include this program in distribution disks, provided total charges
for the entire disk of programs, copying and shipping do not exceed
$20.00. My vote of thanks goes to those clubs that have kept their
charges under $10.00.
Portions of the compiled programs FONTSY.EXE and FONTCODE.EXE are
Copyrighted by Microsoft Corp. 1982, 1983, 1984, 1985, 1986.
MASM AND QuickBASIC are Trademarks of Microsoft Corporation